home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
intrvews
/
tut-code.lha
/
tut-code
/
button1
/
main.c
< prev
Wrap
C/C++ Source or Header
|
1992-01-02
|
767b
|
41 lines
#include <IV-look/kit.h>
#include <InterViews/background.h>
#include <InterViews/place.h>
#include <InterViews/session.h>
#include <InterViews/style.h>
#include <InterViews/window.h>
#include <stdio.h>
class App {
public:
void msg();
};
declare(ActionCallback,App)
implement(ActionCallback,App)
void App::msg() {
printf("hi mom!\n");
}
int main(int argc, char** argv) {
Session* session = new Session("Himom", argc, argv);
Style* style = session->style();
Kit* kit = Kit::instance();
App* a = new App;
session->run_window(
new ApplicationWindow(
new Background(
new Margin(
kit->simple_push_button(
"Push me", style,
new ActionCallback(App)(a, &App::msg)
),
10.0
),
style->flat()
)
)
);
}